onbreak {resume}
transcript on

set PrefMain(saveLines) 50000
.main clear

if {[file exists rtl_work]} {
	vdel -lib rtl_work -all
}
vlib rtl_work
vmap work rtl_work

# load designs
vlog -sv -work rtl_work Mul32.v
vlog -sv -work rtl_work Odd_Colour_Space_Conv.v
vlog -sv -work rtl_work tb_Odd_Colour_Space_Conv.v

# specify library for simulation
vsim -t 100ps -L altera_mf_ver -lib rtl_work tb_Odd_Colour_Space_Conv

# Clear previous simulation
restart -f

# activate waveform simulation
view wave

# add signals to waveform
add wave _Clock_50
add wave uut/resetn
add wave uut/start
add wave uut/finish
add wave uut/state
add wave -unsigned uut/mul1_Op1
add wave -unsigned uut/mul1_Op2
add wave -unsigned uut/mulResult1
add wave -unsigned uut/acc1
add wave -unsigned uut/acc2
add wave -unsigned uut/acc3
add wave -unsigned uut/R
add wave -unsigned uut/G
add wave -unsigned uut/B

# run complete simulation
run -all

destroy .structure
destroy .signals
destroy .source

simstats
